/** 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package it.free.i.virtual.machine.hal.devicealias.laboratory.simulator.dynamicparameter;

import java.util.Observer;

/**  
 * Threaded parameter for system values increasing or decreasing.
 * When the threaded value reach the threshold, this object's implementations
 * fire an event.
 * @author stefano
 */
public interface DynamicParameter extends Runnable, Observer {

	public static final String HEARTBEAT_YELD_PAUSE = "heartbeatyeldpause";
	public static final String HEARTBEATS_NUMBER = "heartbeatsnumber";
	public static final String REACT_ON_COLLISION_WITH_OBJECT = "reactoncollisionwithobject";
	
	/**
	 * Set what the floating parameter is measuring
	 * @param parameterName is what the parameter is representation of 
	 */
	public void setName(String parameterName);
	
	/**
	 * Get the threaded value threshold
	 * @return the threshold that is the value that cause the implementation to react when reached.
	 */
	public long getThreshold();
	
	/**
	 * Set the number of heart beats and the heart beat duration in milliseconds
	 * @param numberOfBeats is the number of beats to modify the internal value going 
	 *        to the threshold
	 * @param beatDuration is the beat duration in milliseconds
	 */
	public void setHeartBeat(long numberOfBeats, long beatDuration );
	
	/**
	 * @return the myReactOnCollisionWithObject
	 */
	public String getReactOnCollisionWithObject();

	/**
	 * @param myReactOnCollisionWithObject the myReactOnCollisionWithObject to set
	 */
	public void setReactOnCollisionWithObject(String myReactOnCollisionWithObject);
	
}
